<!--
 ~ Copyright (c) 2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 ~
 ~ WSO2 Inc. licenses this file to you under the Apache License,
 ~ Version 2.0 (the "License"); you may not use this file except
 ~ in compliance with the License.
 ~ You may obtain a copy of the License at
 ~
 ~    http://www.apache.org/licenses/LICENSE-2.0
 ~
 ~ Unless required by applicable law or agreed to in writing,
 ~ software distributed under the License is distributed on an
 ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 ~ KIND, either express or implied.  See the License for the
 ~ specific language governing permissions and limitations
 ~ under the License.
 -->
<html>
<body>
<h2>Securing a service</h2>
<h3>How to enable security on a service?</h3>
<p><strong>Steps</strong></p>
<ol>
<li>If you want to use Username Token related security scenarios you must create user groups who are authorized to access the service. User groups can be created from the system-default user store or an external storage. For more details on creating user groups click <a href="#usergroupmgt">here</a></li>
<li>If you want to provide X509 related security scenarios, add the trusted certificates to the system. For more details click <a href="#keystoremgt">here</a></li>
<li>Go to the "Service Information" page of the particular service.</li>
<li>Click on "Security" link under "Service Management" page.</li>
<li>Select "Enable Security" as yes. This will show you a list of available security scenarios.</li>
<li>Select the scenario and click on Next. Follow the steps</li>
</ol>
<h3>How to disable a security of a service?</h3>
<p><strong>Steps</strong></p>
<ol>
<li>Go to the "Service Information" page of the particular service.</li>
<li>Click on "Security" link under "Service Management" page.</li>
<li>Select "Enable Security" as No. This will disable security.</li>
</ol>
<h2>Security Management</h2>
<div>
<img alt="Security Management UI" src="images/menu.jpg" align="left" hspace="20"/>
<ul>
<li><a href="#usermgt">User Management</a></li>
<p>You can add/delete users to the system default user store. Click on change password to change the password of user</p>
<li><a href="#userstoremgt">User Store Management</a></li>
<p>External user stores can be added to the system. External user stores can be either a relational database or a LDAP server.</p>
<li><a href="#usergroupmgt">User Group Management</a></li>
<p>Create user groups using the system default user store or from external users stores. When you assign Username Token authentication to services you must select more than
one user groups to authenticate users.</p>
<p></p>
<li><a href="#keystoremgt">Key Store Management</a></li>
<p>Add key stores to the system. When adding trusted certificates you can add the whole trusted certificate store or import your certificates into a key store that is already
existing in the system.</p>
</ul>
</div>
<div style="position:absolute; left: 10px; margin-top:120px;">

<h2><a name="usermgt">User Management</a></h2>
<p>Users can be added to the system default user store using the UI. Users can be deleted and their passwords can be changed.</p>
<img alt="Security Management UI" src="images/users.jpg"/>

<h2><a name="userstoremgt">User Store Management</a></h2>
<p>The application server can connect to external LDAP servers and JDBC user stores. When creating a connection to external user stores all connection properties must be specified</p>
<img alt="Security Management UI" src="images/userstores.jpg"/>

<h2><a name="usergroupmgt">User Group Management</a></h2>
<p>User groups can be created from external and system-default user stores. A user group can have users from a single user store only. Later on it can be edited to add/remove users.</p>
<img alt="Security Management UI" src="images/usergroups.jpg"/>
<h2><a name="keystoremgt">Key Store Management</a></h2>
<p>Key stores can be uploaded to the server.</p>
<img alt="Security Management UI" src="images/keystores1.jpg"/>
<p>You also have the option of uploading the trusted certificates to an existing keystore.</p>
<img alt="Security Management UI" src="images/keystores2.jpg"/>
</div>
</body>
</html>
